<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<title>任务执行日志</title>
	<script type="text/javascript" src="../../js/boot.js"></script>
</head>

<body>
	<div style="width:100%;">
		<fieldset id="fd1" style="width: 97%; margin-bottom: 4px;">
			<legend><span>查询条件</span></legend>
			<div id="queryForm" class="fieldset-body">
				<table class="form-table" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="form-label">
							<input id="taskID" name="taskID" class="mini-hidden" />
							<span>日期从：</span>
							<input name="startTime_from" class="mini-datepicker" format="yyyy-MM-dd" style="width: 150px" />
							<span>到：</span>
							<input name="startTime_to" class="mini-datepicker" format="yyyy-MM-dd" style="width: 150px" />
							<a class="mini-button" onclick="doSearch">查询</a>
						</td>
					</tr>
				</table>
			</div>
		</fieldset>
	</div>

	<div style="width:100%;height:86%;">
		<div class="mini-fit">
			<div id="datagrid" class="mini-datagrid" style="width:100%;height:100%;" pageSize="20" allowResize="true">
			</div>
		</div>
	</div>
</body>

<script type="text/javascript">
	miniInit();

	var queryForm = new mini.Form("#queryForm");
	var datagrid = mini.get("datagrid");
	datagrid.set({
		url: http.getUrl("/com/map/page.do"),
		columns: [
			{ type: "indexcolumn", width: 15, },
			{ field: "taskName", width: 120, headerAlign: "center", header: "任务名称" },
			{ field: "className", width: 120, headerAlign: "center", header: "任务执行类" },
			{ field: "startTime", width: 80, headerAlign: "center", header: "开始执行时间", dateFormat: "yyyy-MM-dd HH:mm:ss" },
			{ field: "endTime", width: 80, headerAlign: "center", header: "结束执行时间", dateFormat: "yyyy-MM-dd HH:mm:ss" },
			{ field: "result", width: 40, headerAlign: "center", header: "执行结果" },
			{ field: "message", width: 140, headerAlign: "center", header: "详细信息" }
		]
	});

	function setData(taskID) {
		var text = mini.get("taskID");
		text.setValue(taskID);
		doSearch();
	}

	function doSearch() {
		var data = queryForm.getData(true, false);
		data.tableName = "AD_TASK_LOG_VIEW";
		data.orderBy = "startTime DESC";
		datagrid.load(data, null, miniui.showLoadErrorMessageBox);
	}

</script>

</html>